package com.xing.common;

import org.apache.shiro.crypto.hash.SimpleHash;

/**
 * Created by Bradish7Y on 2017/9/8.
 */
public class PasswordUtil {
    public static String generatePassword(String algorithmName, String password, String salt, int hashIterations) {
        SimpleHash hash = new SimpleHash(algorithmName, password, salt, hashIterations);
        String encodedPassword = hash.toHex();

        return encodedPassword;
    }

}
